package cn.dengta.webapp.im.dto;

import lombok.Getter;
import lombok.Setter;

/**
 * 云信自定义红包消息的请求封装类
 */
@Getter
@Setter
public class RedPacketDTO {

	Long fromUserId;
	/** 红包Token：已经过特殊编码处理，防止自动程序按照规律推测ID */
	String token;
	/** 红包的备注文本消息 */
	String msg;

	Long groupId;
	String imGroupId;

	/** 红包金额 */
	Integer totalCoin;
	/** 指定收红包用户信息 */
	ToUser toUser;

	public RedPacketDTO init(Long fromUserId, Integer totalCoin, String token, String msg, Long groupId, String imGroupId, ToUser toUser) {
		this.fromUserId = fromUserId;
		this.totalCoin = totalCoin;
		this.token = token;
		this.msg = msg;
		this.groupId = groupId;
		this.imGroupId = imGroupId;
		this.toUser = toUser;
		return this;
	}

	@Getter
	@Setter
	public static class ToUser {

		String toUserId;
		String nickname;

	}

}
